//
//  JXLProFileTableViewController.swift
//  MicroBlog
//
//  Created by 贾晓磊 on 16/9/19.
//  Copyright © 2016年 贾晓磊. All rights reserved.
//

import UIKit

class JXLProFileTableViewController: JXLVisitorTableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        //setupNavUI()

        if isLogin {
            
            addNavRightBarButtonItem()
        } else {
            visitorView?.updatevisitorInfo(message: "登录后，你的微博、相册、个人资料会显示在这里，展示给别人", imageName: "visitordiscover_image_profile")
        }
        
    
    }
    //添加右边的barButtonItem
   private func addNavRightBarButtonItem() {
    navigationItem.rightBarButtonItem = UIBarButtonItem(title: "push", imageName: nil, target: self, action: #selector(pushAction))
    }
    //右边的barButtonItem点击方法
   @objc private func pushAction() {
        let viewController = JXLTestViewController()
    navigationController?.pushViewController(viewController, animated: true)
    }
    
    //    private func setupNavUI() {
    //        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "登录")
    //        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "注册")
    //           }

}
